package com.cloud.mall.oms.service;

import com.cloud.mall.api.CommonPage;
import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.oms.dto.OmsReturnApplyQueryParam;
import com.cloud.mall.oms.dto.OmsUpdateStatusParam;
import com.cloud.mall.oms.out.OmsOrderReturnApplyOut;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "订单退货申请管理")
@RequestMapping("/returnApply")
public interface OmsOrderReturnApplyService {

    @ApiOperation("分页查询退货申请")
    @GetMapping("/list")
    BaseResponse<CommonPage<OmsOrderReturnApplyOut>> list(OmsReturnApplyQueryParam queryParam,
                                                          @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
                                                          @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);
    @ApiOperation("批量删除申请")
    @PostMapping("/delete")
    BaseResponse delete(@RequestParam("ids") List<Long> ids);

    @ApiOperation("获取退货申请详情")
    @GetMapping("/{id}")
    BaseResponse<OmsOrderReturnApplyOut> getItem(@PathVariable Long id);

    @ApiOperation("修改申请状态")
    @PostMapping("/update/status/{id}")
    BaseResponse updateStatus(@PathVariable Long id, @RequestBody OmsUpdateStatusParam statusParam);

}
